using Microsoft.EntityFrameworkCore.Query;

namespace Contoso_University_Web.Models
{
    public class Student
    {
        /// <summary>
        /// 主键
        /// EF Core会将ID/classnameID属性作为主键
        /// </summary>
        public int ID { get; set; }
        public string LastName { get; set; }
        public string FirstMidName { get; set; }
        public DateTime EnrollmentDate { get; set; }
        /// <summary>
        /// 导航属性：关联的其他实体
        /// 如果包含多个实体，则使用集合类型ICollection<T>（List<T>/HashSet<T>），否则使用单个实体类型。
        /// </summary>
        public ICollection<Enrollment> Enrollments { get; set; } = new List<Enrollment>();
    }
}
